<div class = "main-view"><!--最外层div-->
    <div class="left-margin top-margin"><strong class="am-text-primary am-text-lg">版主考核</strong></div>


    <form class="am-form-inline left-margin top-margin" role="form">
        <div class="am-form-group">

            <div class = "city-cascading" style = "display: inline-block;" id = "cascad-search"></div>

            <div class="top-margin">
                <label class="left-margin">昵称:</label> <input type="text" class="am-form-field" ng-model="nickName">
                <label class="left-margin">手机:</label> <input type="text" class="am-form-field" ng-model="mobilePhone">
            </div>

            <div class="top-margin">

                <div  id="cycle" class="am-input-group am-datepicker-date" data-am-datepicker="{format: 'yyyy-mm', viewMode: 'years', minViewMode: 'months'}">
                    <!--<label class="left-margin">考核周期:</label>-->
                    <input id="cycleDate" type="text" class="am-form-field" placeholder="考核周期" readonly>
                    <span class="am-input-group-btn am-datepicker-add-on">
                        <button class="am-btn am-btn-default" type="button"><span class="am-icon-calendar"></span> </button>
                    </span>
                </div>
            </div>

            <!--<div class="top-margin">-->
                <!--<label class="left-margin">申请时间:</label>-->
                <!--<input type="text" id="startDate" class="form-control datepicker" size="12" data-date-format="yyyy-mm-dd">-->
                <!--<label >至:</label>-->
                <!--<input type="text" id="endDate" class="form-control datepicker" size="12" data-date-format="yyyy-mm-dd">-->
            <!--</div>-->

        </div>

        <button type="submit" class="am-btn am-btn-primary" ng-click="search($event)" data-target = "cascad-search">搜索</button>

    </form>
    <br>

    <div id = "pagination" class = "pagination"></div>
    <div class="pagination-table left-margin" id="tab_menu" style = "margin-top: 0px;">
        <form class="am-form">
            <table class="am-table am-table-striped am-table-hover table-main">
                <thead>
                <tr>
                    <th class="table-check"><input type="checkbox" ng-click="allSelected()"></th>
                    <th class="table-title">小区	</th>
                    <th class="table-title">昵称</th>
                    <th class="table-title">单元号</th>
                    <th class="table-title">手机号</th>
                    <th class="table-title">发帖数</th>
                    <th class="table-title">回复数</th>
                    <th class="table-title">置顶数</th>
                    <th class="table-title">置精华数</th>
                    <th class="table-title">推送数</th>
                    <!--<th class="table-title">转移帖子数</th>-->
                    <!--<th class="table-title">得分</th>-->
                    <!--<th class="table-title">详细考评</th>-->
                    <th class="table-title">活跃度</th>
                    <!--<th class="table-title">详细信息</th>-->
                    <th class="table-title">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="user in userList">
                    <td class="table-check"><input type="checkbox" class="item-check"></td>
                    <td>{{user.communityName}}</td>
                    <td>{{user.nickName}}</td>
                    <td>{{user.roomUnit}}</td>
                    <td>{{user.mobilePhone}}</td>
                    <td>{{user.postCount}}</td>
                    <td>{{user.replyCount}}</td>
                    <td>{{user.topCount}}</td>
                    <td>{{user.levelCount}}</td>
                    <td>{{user.pushCount}}</td>
                    <td>{{user.aduCount}}</td>

                    <!--<td>{{user.replyCount}}</td>-->
                    <!--<td>{{}}</td>-->
                    <!--<td>{{}}</td>-->
                    <!--<td>{{}}</td>-->
                    <td>
                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary" ng-click="rejectRole(user)"><span class="am-icon-pencil-square-o"></span> 取消</button>
                    </td>
                </tr>
                </tbody>
            </table>
        </form>
    </div>



    <div class = "left-margin">共<span id = 'page_number'>{{pageNumber}}</span>页 <span>{{count}}条数据</span></div>


</div>


<script>
    Date.prototype.format = function (format) {
        var o = {
            "M+": this.getMonth() + 1, //month
            "d+": this.getDate(), //day
            "h+": this.getHours(), //hour
            "m+": this.getMinutes(), //minute
            "s+": this.getSeconds(), //second
            "q+": Math.floor((this.getMonth() + 3) / 3), //quarter
            "S": this.getMilliseconds() //millisecond
        }
        if (/(y+)/.test(format)) format = format.replace(RegExp.$1,
                (this.getFullYear() + "").substr(4 - RegExp.$1.length));
        for (var k in o) if (new RegExp("(" + k + ")").test(format))
            format = format.replace(RegExp.$1,
                    RegExp.$1.length == 1 ? o[k] :
                            ("00" + o[k]).substr(("" + o[k]).length));
        return format;
    }

    var fromDate = $('#startDate').datepicker().on('changeDate', function (ev) {
        //alert(ev.date.format('yyyy-MM-dd'));
        //$scope.startDate=ev.date.format('yyyy-MM-dd');
        $("#startDate").val(ev.date.format('yyyy-MM-dd'));
//        alert(ev.date);
    });

    var toDate = $('#endDate').datepicker().on('changeDate', function (ev) {
        // alert(ev.date.format('yyyy-MM-dd'));
        //$scope.endDate=ev.date.format('yyyy-MM-dd');
        $("#endDate").val(ev.date.format('yyyy-MM-dd'));
    });

    var toDate = $('#cycle').datepicker().on('changeDate', function (ev) {
        // alert(ev.date.format('yyyy-MM-dd'));
        //$scope.endDate=ev.date.format('yyyy-MM-dd');
        $("#cycle").val(ev.date.format('yyyy-MM'));
    });


    var hideContent = function(obj){
        $("#display_hide_content").css("display","block");
        $("#display_hide_content1").text(obj.innerText);
        $("#display_hide_content")[0].style.left = obj.offsetLeft + "px";
        $("#display_hide_content")[0].style.top = 60 + obj.offsetTop + "px";
    };

    $("#display_hide_close").on("click",function(){
        $("#display_hide_content").css("display","none");
    });

</script>